package cn.dengta.webapp.user.entity;

import cn.dengta.webapp.base.entity.TimeBasedEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import me.codeplayer.util.Cmp;

/**
 * 用户爱情树 邀请记录
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("dt_user_love_tree_invitation")
public class UserLoveTreeInvitation extends TimeBasedEntity {

	/** 邀请者用户id */
	private Long userId;
	/** 被邀请者用户id */
	private Long toUserId;
	/** 0=已发邀请；1=已接受邀请 */
	private Integer status;

	public UserLoveTreeInvitation(Long userId, Long toUserId) {
		this.userId = userId;
		this.toUserId = toUserId;
	}

	public boolean isAccept(){
		return Cmp.eq(this.status, 1);
	}
}
